<?php
// +----------------------------------------------------------------------
// | Description: 系统配置
// +----------------------------------------------------------------------
// | Author: linchuangbin <linchuangbin@honraytech.com>
// +----------------------------------------------------------------------

namespace app\admin\controller;

use app\common\controller\AdminAuthController;
use app\common\model\SystemConfig as SystemConfigModel;

class SystemConfig extends AdminAuthController
{
    /**
     * 保存配置
     * @return \think\response\Json
     */
    public function save()
    {
        $configModel = SystemConfigModel::instance();
        $param = $this->param;
        $data = $configModel->createData($param);
        if (!$data) {
            return $this->json_responce(['error' => $configModel->getError()]);
        }
        return $this->json_responce();
    }
}
